package com.linwen.excise.niuke._40;

import java.util.*;

/**
 * @author wlw
 * @date 2023/3/5 4:03 PM
 */
public class _23删除字符串中出现次数最少的字符 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        char[] chars = str.toCharArray();
        Map<Character,Integer> map = new HashMap();
        for (char aChar : chars) {
            if(map.containsKey(aChar)){
                map.put(aChar,map.get(aChar)+1);
            }else{
                map.put(aChar,1);
            }
        }
        Collection<Integer> values = map.values();
        Integer min = Collections.min(values);

        for (Character character : map.keySet()) {
            if(map.get(character)==min){
                str = str.replace(character.toString(),"");
            }
        }
        System.out.println(str);
    }
}
